#!/usr/bin/python
#from tkinter import *

# Name
# Class
# Teacher
# Room Location
# Schedule
#    Days
#    Time on said days
#    Other information from syllabus
#       Assignment for each day.
#


#Example (Hello, World):
import tkinter
import tkinter.constants as TKC
import tkinter.ttk as ttk

class View(object):
    def __init__(self):
        global root
        root = tkinter.Tk()
        GlobalMenu()
        Editor()

class GlobalMenu:
    def __init__(self):
        MenuBar = tkinter.Menu(root)
        MenuBar.add_command(label="File", command="")
        MenuBar.add_command(label="Open", command="")
        MenuBar.add_cascade(label="File")
        root.configure(menu=MenuBar)
    def a_menu(self, parent):
        self.global_menu_frame = tkinter.Frame(parent)
        self.global_menu_frame.pack(side=TKC.TOP)
        self.help_btn = ttk.Menubutton(self.global_menu_frame, text='Help', underline=0)
        self.help_btn.pack(side=TKC.LEFT, padx="2m")
        self.help_btn.menu = tkinter.Menu(self.help_btn, tearoff=0)
        self.help_btn.menu.add_command(label="How To", underline=0, command="")
        self.help_btn.menu.add_command(label="About", underline=0, command="")
        self.help_btn['menu'] = self.help_btn.menu
    
class Editor(object):
    def __init__(self):
        self.window_frame = tkinter.Frame(root)
        self.window_frame.pack()
        self.label = tkinter.Label(self.window_frame, text="Hello, World")
        self.label.pack(fill=TKC.X, expand=1)

        #self.window_frame.configure(background="black")
        self.canvas = tkinter.Canvas(self.window_frame, borderwidth=4, width=30, height=15)
        #self.canvas.pack()
        self.canvas.pack(fill=TKC.BOTH,expand = 0)
#Spinbox is pretty worthless        self.spin = tkinter.Spinbox(self.canvas, value=('AL','AM','AZ')) #or specify a range of values: from_ = 0, to = 100
#        self.spin.pack(fill=X, expand=1)
        self.text = tkinter.Text(self.canvas)
        self.text.config(font="Arial")
        self.text.pack(fill=TKC.Y, expand=0)

    def editorMenu(self):
        self.editorMenu = tkinter.Menu(self.window_frame)
        self.editorMenu.pack()
    

        #return help_btn

##    def left_frame():
##        left_frame = tkinter.Frame(self.window_frame)
##        left_frame.pack(side=LEFT)
##        cheese = tkinter.Label(left_frame, text="something goes here")
##        cheese.pack()
##
##    def main_frame(self):
##        self.main_frame = tkinter.Frame(self.window_frame, relief=RIDGE, borderwidth=2)
##        self.main_frame.pack(fill=BOTH,expand=1)
##
##    def menu_bar():
##        menubar = tkinter.Menu(self.window_frame)
##        menubar.add_command(label="Home", command=root.destroy)
##        menubar.add_command(label="Calendar", command=root.destroy)
##        menubar.add_command(label="Client Management", command=root.destroy)
##        menubar.add_command(label="Case Management", command=root.destroy)
##        menubar.add_separator()
##        DropDown = menubar.add_cascade(label="DropDown")
##        SecondDropDown = help_menu()
##        SecondDropDown.pack()
##        menubar.add_checkbutton (label="Green")
##        menubar.add_radiobutton(label="Orange")
###menubar.insert_checkbutton(DropDown, label="JB")
### display the menu
##        self.window_frame.config(menu=menubar)
##
##    def text_field():
##        label = tkinter.Label(self.main_frame, text="Hello, World")
##        label.pack(fill=X, expand=1)
##        cv = tkinter.Canvas(self.main_frame, borderwidth=4)
##        self.main_frame.configure(background="black")
##        cv.pack(fill=BOTH,expand = 0)
##        spin = tkinter.Spinbox(cv, from_ = 0, to = 100)
##        spin.pack(fill=X, expand=1)
##        text = tkinter.Text(cv)
##        text.config(font="Arial")
##        text.pack(fill=Y, expand=0)
##
##    def misc():
##        button = tkinter.Button(self.main_frame, text="Exit",command=ben)
##        button.pack(side=BOTTOM)
##        entry = tkinter.Entry(self.main_frame)
##        entry.delete(0, END)
##        entry.insert(0, "a default value")
##        entry.pack(side=BOTTOM)
##        password = tkinter.Entry(self.main_frame, show="*")
##        password.pack(side=BOTTOM)


a= View()
root.mainloop()





